const Main = imports.ui.main;
const PopupMenu = imports.ui.popupMenu;
const Realmd = imports.gdm.realmd;
-const Tweener = imports.ui.tweener;
const UserWidget = imports.ui.userWidget;
const _FADE_ANIMATION_TIME = 250;
let adjustment = this.actor.get_vscroll_bar().get_adjustment();
let value = (box.y1 + adjustment.step_increment / 2.0) - (adjustment.page_size / 2.0);
- Tweener.removeTweens(adjustment);
- Tweener.addTween (adjustment,
- { value: value,
- time: _SCROLL_ANIMATION_TIME / 1000,
- transition: 'easeOutQuad' });
+ adjustment.ease(value, {
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+ duration: _SCROLL_ANIMATION_TIME
+ });
}
jumpToItem(item) {
const Signals = imports.signals;
const Main = imports.ui.main;
-const Tweener = imports.ui.tweener;
const Params = imports.misc.params;
var SCROLL_TIME = 100;
else
return;
- Tweener.addTween(adjustment,
- { value: value,
- time: SCROLL_TIME / 1000,
- transition: 'easeOutQuad' });
+ adjustment.ease(value, {
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+ duration: SCROLL_TIME
+ });
}
var AppSettingsMonitor = class {
const Main = imports.ui.main;
const PageIndicators = imports.ui.pageIndicators;
const PopupMenu = imports.ui.popupMenu;
-const Tweener = imports.ui.tweener;
const Search = imports.ui.search;
const Params = imports.misc.params;
const Util = imports.misc.util;
time = Math.min(time, PAGE_SWITCH_TIME);
this._grid.currentPage = pageNumber;
- Tweener.addTween(this._adjustment,
- { value: this._grid.getPageY(this._grid.currentPage),
- time: time / 1000,
- transition: 'easeOutQuad' });
+ this._adjustment.ease(this._grid.getPageY(pageNumber), {
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+ duration: time
+ });
+
this._pageIndicators.setCurrentPage(pageNumber);
}
value = Math.max(upper, item.allocation.x2 - pageSize);
this._scrollableRight = true;
- Tweener.addTween(adjustment,
- { value: value,
- time: POPUP_SCROLL_TIME / 1000,
- transition: 'easeOutQuad',
- onComplete: () => {
- if (this._highlighted == 0)
- this._scrollableLeft = false;
- this.queue_relayout();
- }
- });
+ adjustment.ease(value, {
+ progress_mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+ duration: POPUP_SCROLL_TIME,
+ onComplete: () => {
+ if (this._highlighted == 0)
+ this._scrollableLeft = false;
+ this.queue_relayout();
+ }
+ });
}
_scrollToRight() {
value = Math.min(upper, item.allocation.x2 - pageSize);
this._scrollableLeft = true;
- Tweener.addTween(adjustment,
- { value: value,
- time: POPUP_SCROLL_TIME / 1000,
- transition: 'easeOutQuad',
- onComplete: () => {
- if (this._highlighted == this._items.length - 1)
- this._scrollableRight = false;
- this.queue_relayout();
- }
- });
+ adjustment.ease(value, {
+ progress_mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+ duration: POPUP_SCROLL_TIME,
+ onComplete: () => {
+ if (this._highlighted == this._items.length - 1)
+ this._scrollableRight = false;
+ this.queue_relayout();
+ }
+ });
}
_itemActivated(n) {
const Signals = imports.signals;
const Main = imports.ui.main;
-const Tweener = imports.ui.tweener;
const WindowManager = imports.ui.windowManager;
const Workspace = imports.ui.workspace;
this._animatingScroll = true;
- Tweener.addTween(this.scrollAdjustment, {
- value: index,
- time: WORKSPACE_SWITCH_TIME / 1000,
- transition: 'easeOutQuad',
- onComplete: () => {
- this._animatingScroll = false;
- }
+ this.scrollAdjustment.ease(index, {
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+ duration: WORKSPACE_SWITCH_TIME,
+ onComplete: () => this._animatingScroll = false
});
}